package cn.com.huzo.model.entities.tech;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 均码单耗主记录实体类
 *
 * @author 吴旭
 */
public class PieceYardageHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 3382810562832748993L;
    private Long HeaderId;
    private Long CatalogueId;                  // 单耗目录ID
    private String CatalogueName;              // 单耗目录名
    private Long ProductId;                    // 产品标识
    private String StyleNo;                    // 产品款号
    private String ProductName;                // 品名
    private String CustomerName;               // 客户名称
    private String IcLabDipIndication;         // IC色样指示
    private String EmbroideryLaceAndOther;     // 刺绣花边及其他物品单耗
    private String Notes;                      // 注意事项
    private Timestamp DateOfFilling;           // 填报日期
    private Long DesignedBy;                   // 设计者
    private String DesignedByName;
    private Long GradedBy;                     // 单耗员
    private String GradedByName;
    private String TypeFlag;                   // 单耗标记,'0':正常单耗，'1':副资材
    private String Description;                // 备注
    private Short QuotedFlag;                  // 被引用标记（决定是否可删除）
    private Short MrpStatus;                   // 关联调达表审核状态（如果被审核，则该单耗不能修改）

    public Long getHeaderId() {
        return HeaderId;
    }

    public Long getCatalogueId() {
        return CatalogueId;
    }

    public String getCatalogueName() {
        return CatalogueName;
    }

    public Long getProductId() {
        return ProductId;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public String getIcLabDipIndication() {
        return IcLabDipIndication;
    }

    public String getEmbroideryLaceAndOther() {
        return EmbroideryLaceAndOther;
    }

    public String getNotes() {
        return Notes;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfFilling() {
        return DateOfFilling;
    }

    public Long getDesignedBy() {
        return DesignedBy;
    }

    public String getDesignedByName() {
        return DesignedByName;
    }

    public Long getGradedBy() {
        return GradedBy;
    }

    public String getGradedByName() {
        return GradedByName;
    }

    public String getTypeFlag() {
        return TypeFlag;
    }

    public String getDescription() {
        return Description;
    }

    public Short getQuotedFlag() {
        return QuotedFlag;
    }

    public Short getMrpStatus() {
        return MrpStatus;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public void setCatalogueId(Long CatalogueId) {
        this.CatalogueId = CatalogueId;
    }

    public void setCatalogueName(String CatalogueName) {
        this.CatalogueName = CatalogueName;
    }

    public void setProductId(Long ProductId) {
        this.ProductId = ProductId;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public void setIcLabDipIndication(String IcLabDipIndication) {
        this.IcLabDipIndication = IcLabDipIndication;
    }

    public void setEmbroideryLaceAndOther(String EmbroideryLaceAndOther) {
        this.EmbroideryLaceAndOther = EmbroideryLaceAndOther;
    }

    public void setNotes(String Notes) {
        this.Notes = Notes;
    }

    public void setDateOfFilling(Timestamp DateOfFilling) {
        this.DateOfFilling = DateOfFilling;
    }

    public void setDesignedBy(Long DesignedBy) {
        this.DesignedBy = DesignedBy;
    }

    public void setDesignedByName(String DesignedByName) {
        this.DesignedByName = DesignedByName;
    }

    public void setGradedBy(Long GradedBy) {
        this.GradedBy = GradedBy;
    }

    public void setGradedByName(String GradedByName) {
        this.GradedByName = GradedByName;
    }

    public void setTypeFlag(String TypeFlag) {
        this.TypeFlag = TypeFlag;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public void setQuotedFlag(Short QuotedFlag) {
        this.QuotedFlag = QuotedFlag;
    }

    public void setMrpStatus(Short MrpStatus) {
        this.MrpStatus = MrpStatus;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PieceYardageHeaderEntity)) {
            return false;
        }

        final PieceYardageHeaderEntity that = (PieceYardageHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
